﻿let courseName = 'Web Development - The Complete Guide';
let coursePrice = 2300;
let courseGoals = ['Learn Web Development', 'Become a web developer', 'Find a good job!'];

alert(courseName);
alert(coursePrice);
alert(courseGoals[0]);
alert(courseGoals[1]);
alert(courseGoals[2]);

//Objects
let onlineCourse = {name: courseName, price: coursePrice, goals: courseGoals};
let courseObj = {
    name: 'Web Development - The Complete Guide',
    price: 2300,
    goals: ['Learn Web Development', 'Become a web developer', 'Find a good job!']
}
alert(onlineCourse.name);
alert(onlineCourse.price);
alert(onlineCourse.goals[1]);

function getListItem(array, arrayIndex) {
    let arrayElement = array[arrayIndex];
    return arrayElement;
}

let firstGoal = getListItem(courseGoals, 1);
alert(firstGoal);
